const db = wx.cloud.database();
const app = getApp();
Page({
  data: {
    userList: [],
    userType: app.globalData.userInfo.type,
    selectAdmin: !!(app.globalData.userInfo.type === 0) && !(app.globalData.userInfo.selectAdmin)
  },
  onLoad: function (options) {
    db.collection('Management_user').where({
      type: 1
    }).get().then(res => {
      if (res.data.length != 0) {
        this.setData({
          userList: res.data
        })
      }
    })
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },
})